# $Id: PKGBUILD 82257 2013-01-13 18:07:33Z bpiotrowski $
# Maintainer:  Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Contributor: yugrotavele <yugrotavele at archlinux dot us>
# Contributor: Arkham <arkham at archlinux dot us>
# Contributor: Christoph Zeiler <archNOSPAM_at_moonblade.dot.org>
# Contributor: Arnaud Durand <biginozNOSPAM_at_free.dot.fr>
# Contributor: Nuno Araujo <nuno.araujo at russo79.com>

pkgname=bleachbit
pkgver=0.9.5
pkgrel=1
pkgdesc='Deletes unneeded files to free disk space and maintain privacy'
arch=('any')
url='http://bleachbit.sourceforge.net/'
license=('GPL3')
depends=('pygtk>=2' 'python2>=2.6' 'desktop-file-utils' 'gtk-update-icon-cache'
         'hicolor-icon-theme')
install=$pkgname.install
source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2)
md5sums=('a635f6eba762f91d8897ce9e8d5b6232')

package() {
    cd $srcdir/$pkgname-$pkgver

    for file in $(find . -name '*.py' -print); do
        sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' $file
        sed -i 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file
    done
    sed -i 's/python/python2/g' Makefile

    make prefix=/usr DESTDIR=$pkgdir PYTHON=python2 install
}
